package com.example.demo.service;

import com.example.demo.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service
public class LogoutService {

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    public Result logout(String token){
        redisTemplate.delete("TOKEN_" + token);
        return Result.success(null);
    }
}
